//
//  CoverFlowTestViewController.m
//  CoverFlowTest
//
//  Created by tt on 10-8-15.
//  Copyright TT 2010. All rights reserved.
//

#import "CoverFlowTestViewController.h"

@implementation CoverFlowTestViewController
- (void)openFlowView:(AFOpenFlowView *)openFlowView requestImageForIndex:(int)index{
	NSLog(@"request image for index called");
}
- (void)openFlowView:(AFOpenFlowView *)openFlowView selectionDidChange:(int)index{
	NSLog(@"selection did change called");
}
- (UIImage *)defaultImage{
	NSLog(@"default call");
	return [UIImage imageNamed:@"default.jpg"];
}

/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/



// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
	[(AFOpenFlowView *)self.view setNumberOfImages:40]; 
	for (int i=0; i<=40; i++) {
		UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"t%d.jpg",i%6]];
		[(AFOpenFlowView *)self.view setImage:image forIndex:i];
	}
    [super viewDidLoad];
}



// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}

@end
